home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / MacMud / Sockets / README < prev    next >
Encoding:
Text File  |  1989-10-30  |  2.6 KB  |  69 lines  |  [TEXT/MPS ]

  1. The socket library is now on madhaus.utcs.utoronto.ca (128.100.102.10) in
  2. anonymous ftp's /pub directory.
  3.  
  4. When it is unbixhexed and unstuffed there will be a folder called sockets
  5. containing folders socket, unixlib, unixincludes and obj, and a file called
  6. MPW Startup.
  7.  
  8. Socket contains the source for the socket library and some test programs.
  9.  
  10. Unixincludes contains header files from 4.3bsd modified where necessary
  11. to be used on a mac.
  12.  
  13. Unixlib contains a bunch of C runtime routines that dont comes with MPW.
  14.  
  15. The makefiles compile into the obj folder.
  16.  
  17. MPW Startup sets up a bunch of shell variables which the makefiles
  18. depend on. You will have to graft these onto your own MPW startup
  19. procedure.
  20.  
  21. ------
  22.  
  23. There isn't any documentation except what is in the code. However,
  24. socket:socket.c contains a unix-manual-page-style entry above each procedure.
  25. Some of the details there, such as error returns, are wrong. sorry.
  26.  
  27. All of the routines have s_ prefixed to their names to avoid conflicts
  28. with MPW routines of the same name.
  29.  
  30. The usual socket routines are there, along with the gethostbyname stuff
  31. and a very badly done stdio interface for sockets.
  32.  
  33. -------
  34.  
  35. This code started life as the top layer of a complete tcp/ip implementation
  36. produced by the Centre for Information Technology Interchange (CITI) at the
  37. University of Michigan. We used the CITI stuff here until Mactcp was
  38. available from apple. It wasn't very good and they appear to have stopped
  39. working on it. Adapting the socket stuff to Mactcp meant a complete rewrite
  40. because of the major differences in the semantics of the two implementations.
  41. There is now so little left of the CITI code that I have removed their
  42. copyright notices.
  43.  
  44. -----
  45.  
  46. Non-blocking I/O is fairly important in Mac applications. This library
  47. supports the berkeley non-blocking I/O scheme, where it s defined, and
  48. invents its own where necessary. You will probably have to read the code
  49. to see exactly what you get back in strange situations.
  50.  
  51. Both select() and the NBIO ioctl() are provided. Even so, it is
  52. a lot of work to go through an existing Unix application and change
  53. it to not lock up the mac user interface. There is one non-berkeley
  54. extension in the library which makes this very simple (in most cases).
  55. A routine called s_spinroutine() provides the library with a routine to
  56. call repeatedly when it is blocking. This should be a call-back to the
  57. application's event loop.
  58.  
  59. -------
  60.  
  61. Thats all I can think of to say at the minute. Feel free to call or write
  62. if you have questions, and please let me know about bugs.
  63.  
  64. Tom Milligan
  65. University of Toronto
  66. Computing Services
  67. 416-978-6134
  68. milligan@madhaus.utcs.utoronto.ca
  69.